CxArsEditor Methods

The CxArsEditor object contains the following methods:

Connect

The Connect method connects the object to a service.

Syntax

Connect(DomainSiteService As String)

Parameters

Parameter Required Description

DomainSiteService

Yes

The [Domain]Site.Service to which to connect. The domain is optional. The service must be a valid one.

Remarks

Returns 0 if successful and a non-zero value if the connection failed.

Example

The following example connects the Client object to the CYGDEMO.<SVC> on domain 5410:

Copy
Connect
Sub

    Dim ArsEditor
    Set ArsEditor = CreateObject("CxEditors.CxArsEditor")
    ArsEditor.Connect("[5410]CYGDEMO.ARS")

End Sub

Back to top

Delete

The Delete method prompts the user to delete an ARS entry.

Syntax

Delete(QueueKey As String) As Integer

Parameters

Parameter Required Description

QueueKey

Yes

The database queue key of the record to delete.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  1 OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches the specified Delete dialog box for record "0000012345":

Copy
Delete
Sub

    Dim iRet
    iRet = <SvcEditor>.Delete("0000012345")
 
    MsgBox iRet
    
End Sub

The following example prompts the user to delete CYGDEMO.OPCIS from the ARS.

Copy
Delete
Sub

    Dim iRet
    iRet = ArsEditor.Delete("CYGDEMO.OPCIS")
 
    MsgBox iRet
    
End Sub

Back to top

Disconnect

The Disconnect method disconnects from the connected service.

Syntax

Disconnect() As Integer

Remarks

The Disconnect method returns 0 if successful and a non-zero value if the disconnect failed.

Example

The following example disconnects the Client object from the connected service, and pops a message box if it is unsuccessful:

Copy
Disconnect
Sub Svc.Disconnect()
 
    <SvcClient>.Disconnect()
    MsgBox "Service has disconnected."
    
    If <SvcClient>.Disconnect <> 0 
    Then
        MsgBox "Failed to disconnect."
    End If

End Sub

Back to top

Edit

The Edit method launches an ARS dialog box with the information in the specified entry.

Syntax

Edit(SiteService As String) As Integer

Parameters

Parameter Required Description

SiteService

Yes

The Site.Service to edit.

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  1 OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches a dialog box for the CYGDEMO.OPCIS entry.

Copy

Edit

Sub

    Dim iRet
    iRet = ArsEditor.Edit("CYGDEMO.OPCIS")
     
    MsgBox iRet

End Sub

Back to top

New

The New method launches a New Service dialog box for creating a new ARS entry.

Syntax

New() As Integer

Remarks

This method returns one of the following values:

  -1 or 0 An error occurred.
  1 OK button was pressed.
  2 Cancel button was pressed.

Example

The following example launches the specified editor dialog box:

Copy
New
Sub

    Dim iRet
    iRet = <SvcEditor>.New
 
    MsgBox iRet
    
End Sub

Back to top